﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Globalization;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Security;

namespace KabiManagementWeb.Models
{
    public  class DBUtils
    {
       public enum DBType
        {
            Remote,
            Local
        }
        public static KBManagementDataContext GetContext(DBType type)
        {
            switch (type)
            {
                case DBType.Remote:
                    return new KBManagementDataContext(System.Configuration.ConfigurationManager.ConnectionStrings["KBManagementConnectionString1"].ConnectionString);

                case DBType.Local:
                    return new KBManagementDataContext();


            }
            return null;
        }
    }
}